#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int fact(int n)
{
	int i = 0;
	int result = 1;
	for (i = 2; i <= n; i++)
	{
		result *= i;
	}
	return result;
}

int main()
{
	int n = 0;
	scanf("%d", &n);
	printf("%d", fact(n));
	return 0;
}